package cl.smartdev.soagov.model;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.OneToMany;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class IntegrationServer {

    /**
     */
    @Size(min = 0)
    @OneToMany(cascade = CascadeType.ALL)
    private Set<Service> services = new HashSet<Service>();

    /**
     */
    @NotNull
    private String name;

    /**
     */
    private int httpPort;

    /**
     */
    @ManyToOne
    private IntegrationNode integrationNode;

    /**
     */
    @OneToOne
    private BusinessLine businessLine;

    /**
     */
    private String dnsName;
}
